﻿@{
    ViewBag.Title = "图书评论";
    Layout = "~/Views/Shared/_Layout.cshtml";
    List<Comments> CommentsList = ViewBag.BookComList;
}
@using Model;
<script>
    $(function () {
        $("[href='/BooksManage/BookComments']").parent("li").addClass("active").parent().parent("div").addClass("collapse in").parent("li").addClass("active");

    });
</script>
<div class="container-fluid">

    <div class="row">
        <div class="col-md-12">
            <div class="card">

                @*<div class="toolbar">
                    <!--        Here you can write extra buttons/actions for the toolbar              -->
                    <a href="/BooksManage/AddBookType">
                        <button class="btn btn-simple btn-wd">添加类型</button></a>
                </div>*@

                <table id="bootstrap-table" class="table">
                    <thead>
                        <th data-field="id" class="text-center">图书ID</th>
                        <th data-field="name" class="text-center">图书名称</th>
                        <th data-field="com" class="text-center">评价等级</th>
                        <th data-field="actions" class="td-actions text-right" data-events="operateEvents"@* data-formatter="operateFormatter"*@>操作</th>
                    </thead>
                    <tbody>
                        @foreach (var item in CommentsList)
                        {
                            <tr>                         
                                <td class="text-center">@item.BookID</td>
                                <td class="text-center">@item.ComDate</td>
                                <td class="text-center">@item.ComDesc</td>
                                   
                                
                                <td class="text-right">
                                    <a rel="tooltip" title="详情" class="btn btn-simple btn-warning btn-icon table-action edit" href="/BooksManage/EditBookType?id=@item.BookID">
                                        <i class="fa fa-edit"></i>
                                    </a>
                                    <a rel="tooltip" title="删除" class="btn btn-simple btn-danger btn-icon table-action remove" href="javascript:void(0)">
                                        <i class="fa fa-remove"></i>
                                    </a></td>
                            </tr>
                        }
                    </tbody>
                </table>
            </div>
            <!--  end card  -->
        </div>
        <!-- end col-md-12 -->
    </div>
    <!-- end row -->
    <br />
</div>
